package com.usian.dept.controller;

import com.usian.common.pojo.Dept;
import com.usian.dept.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @TODO:
 * @Author:baimu
 * @Date:2024 07 02 10 42
 **/

@RestController
@RequestMapping("/api/dept")

public class DeptController {

    @Autowired
    DeptService deptService;


    @GetMapping("/findAll")
    public List<Dept> findAll() {
        return deptService.findAll();
    }
}
